<template>
  <el-dialog
    v-model="isShow"
    :title="title"
    width="800"
    :close-on-click-modal="false"
    @close="handleClose"
  >
    <el-descriptions border :column="1" label-width="120px">
      <el-descriptions-item label-align="right" label="活动名称">{{row.activitiesName}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="活动方式">{{proxy.$util.selectName(row.activitiesMethod, optionData.activitieMethod)}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="活动类型">{{proxy.$util.selectName(row.activitiesType, optionData.activitieType)}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="活动时间">{{row.startTime}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="活动地址">{{row.address}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="签到">{{row.isCheckinRequired == '1' ? '是' : '否'}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="报名费用">{{row.amount}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="最大报名人数">{{row.maxParticipants}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="活动详情">{{row.description}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="推荐语&备注">{{row.recommendations}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="状态">{{proxy.$util.selectName(row.status, optionData.activitieStatus)}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="创建时间">{{row.createTime}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="讨论问题1">{{row.discussionQuestions1}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="讨论问题2">{{row.discussionQuestions2}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="讨论问题3">{{row.discussionQuestions3}}</el-descriptions-item>
      <el-descriptions-item label-align="right" label="封面">
        <el-image
          style="width: 100px; height: 100px"
          :src="baseURL+row.coverImageUrl"
          :zoom-rate="1.2"
          :max-scale="7"
          :min-scale="0.2"
          :preview-src-list="[baseURL+row.coverImageUrl]"
          show-progress
          :initial-index="4"
          fit="cover"
        />
      </el-descriptions-item>
      <el-descriptions-item label-align="right" label="群二维码">
        <el-image
          style="width: 100px; height: 100px"
          :src="baseURL+row.groupQrcodeUrl"
          :zoom-rate="1.2"
          :max-scale="7"
          :min-scale="0.2"
          :preview-src-list="[baseURL+row.groupQrcodeUrl]"
          show-progress
          :initial-index="4"
          fit="cover"
        />
      </el-descriptions-item>
      <el-descriptions-item label-align="right" label="个人二维码">
        <el-image
          style="width: 100px; height: 100px"
          :src="baseURL+row.organizerWechatQrcodeUrl"
          :zoom-rate="1.2"
          :max-scale="7"
          :min-scale="0.2"
          :preview-src-list="[baseURL+row.organizerWechatQrcodeUrl]"
          show-progress
          :initial-index="4"
          fit="cover"
        />
      </el-descriptions-item>
    </el-descriptions>
  </el-dialog>
</template>

<script setup lang="ts">
import {ElMessage, ElMessageBox} from 'element-plus'
import { ref, reactive, inject, getCurrentInstance, ComponentInternalInstance } from 'vue';
const {proxy} = getCurrentInstance() as ComponentInternalInstance;
let optionData:any = inject('optionData'); 
const emit = defineEmits(['confirm']);
let isShow = ref(false);
let title = ref('活动详情');
let row:any = ref({});
const init = (data:any) => {
  row.value = data;
  isShow.value = true;
};
const handleClose = () => {
  
}

defineExpose({
  init,
})
</script>

<style>

</style>